import http from '../utils/http'
/**
 * 核心业务
 * @param {*} data 
 * @param {*} cbFunc 
 */
function coreList(data, cbFunc) {
  http.get('/index/core-list', data).then(res => {
    cbFunc(res)
  })
}
/**
 * 推荐分类
 * @param {*} data 
 * @param {*} cbFunc 
 */
function recList(data, cbFunc) {
  http.get('/index/rec-list', data).then(res => {
    cbFunc(res)
  })
}

/**
 * 热门商品
 * @param {*} data 
 * @param {*} cbFunc 
 */
function hotList(data, cbFunc) {
  http.get('/index/hot-list', data).then(res => {
    cbFunc(res)
  })
}

module.exports = {
  coreList: coreList,
  recList: recList,
  hotList: hotList
}